package com.lzb.permanentcalendar.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.blankj.utilcode.util.AppUtils;
import com.blankj.utilcode.util.CleanUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.lzb.permanentcalendar.BaseNoModelFragment;
import com.lzb.permanentcalendar.R;
import com.lzb.permanentcalendar.activity.FeedbackActivity;
import com.lzb.permanentcalendar.databinding.FragmentMyBinding;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link MyFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class MyFragment extends BaseNoModelFragment<FragmentMyBinding> implements View.OnClickListener {


    @Override
    protected int onCreate() {
        return R.layout.fragment_my;
    }

    @Override
    protected void initView() {
        mDataBinding.llClearCache.setOnClickListener(this);
        mDataBinding.llAgreement.setOnClickListener(this);
        mDataBinding.llPrivacy.setOnClickListener(this);
        mDataBinding.llFeedback.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.llClearCache) {//清除缓存
            CleanUtils.cleanInternalCache();
            ToastUtils.showShort(getString(R.string.clear_suc));
        } else if (id == R.id.llAgreement) {//用户协议

        } else if (id == R.id.llPrivacy) {//隐私政策

        }else if(id==R.id.llFeedback){//意见反馈
            startActivity(FeedbackActivity.class);
        }
    }


    @Override
    protected void initData() {

    }
}